package com.tky.conference.ui;

import android.content.Intent;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.widget.TextView;

import com.tky.conference.R;
import com.tky.conference.base.BaseActivity;
import com.tky.conference.dao.ComeetingInfo;

/**
 * Created by cll on 2015/12/16.
 */
public class FZDetailActivity extends BaseActivity {
    private Toolbar toolbar;
    private ComeetingInfo comeetingInfobj;
    private TextView hyzt,hymc,hydz,sqbm,fzr,hyszt,start,end,sqr,chry,jlr;
    @Override
    public void initView() {
        setContentView(R.layout.activity_detail);
        Intent intent=this.getIntent();
        comeetingInfobj=(ComeetingInfo)intent.getSerializableExtra("duty");
        hyzt=(TextView)this.findViewById(R.id.tv_subject);
        hymc=(TextView)this.findViewById(R.id.tv_name);
        hydz=(TextView)this.findViewById(R.id.tv_address);
        sqbm=(TextView)this.findViewById(R.id.tv_department);
        fzr=(TextView)this.findViewById(R.id.tv_fzr);
        hyszt=(TextView)this.findViewById(R.id.tv_status);
        start=(TextView)this.findViewById(R.id.tv_startTime);
        end=(TextView)this.findViewById(R.id.endTime);
        sqr=(TextView)this.findViewById(R.id.tv_sqr);
        chry=(TextView)this.findViewById(R.id.tv_chry);
        jlr=(TextView)this.findViewById(R.id.tv_jlr);

    }

    @Override
    public void initDates() {
        hyzt.setText(comeetingInfobj.getHyzt());
        hymc.setText(comeetingInfobj.getHysmc());
        hydz.setText(comeetingInfobj.getHydd());
        sqbm.setText(comeetingInfobj.getZbbm());
        fzr.setText(comeetingInfobj.getFzr());
        hyszt.setText(comeetingInfobj.getStatus());
        start.setText(comeetingInfobj.getStime());
        end.setText(comeetingInfobj.getEtime());
        sqr.setText(comeetingInfobj.getSqr());
        chry.setText(comeetingInfobj.getChry());
        jlr.setText(comeetingInfobj.getJlr());
    }

    @Override
    public void initToolBar() {
        toolbar= (Toolbar) findViewById(R.id.toolbar);
        if (toolbar!=null){
            toolbar.setTitle("会议详情");
        }
        setSupportActionBar(toolbar);
    }

    @Override
    public void initEvent() {

    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId()==android.R.id.home){
            finish();
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}
